package com.example.demo.dto.common;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 前后端通用的 Input / Output 数据交换Model
 */
public class UserModel {
    public static final String USERINFO_NAME = "user";

    public static final String USERID = "user_id";
    public static final String NAME = "name";
    public static final String PHONENUM = "phone_num";
    public static final String URGENTCONTACT = "urgent_contact";
    public static final String URGENTCONTACTNUM = "urgent_contact_num";
    public static final String CERTIFICATIONCODE = "certification_code";
    public static final String IM_USER_ID = "im_user_id";
    public static final String IM_USER_SIG = "im_user_sig";

    //用户ID
    private String userId = "";
    //用户姓名
    private String name = "";
    //用户电话号码
    //@JsonProperty(value = PHONENUM)
    private String phoneNum = "";
    //紧急联系人
    private String urgentContact = "";
    //紧急联系电话
    private String urgentContactNum = "";
    //验证码，下发时不用考虑这个字段
    private String certificationCode = "";
    //用户的IM SDK 的ID
    private String IMUserID = "";
    //用户的IM SDK 的SIG
    private String IMUserSig = "";

    public UserModel() {}

    public UserModel(String userId, String name, String phoneNum, String urgentContact,
                     String urgentContactNum, String certificationCode, String IMUserID,
                     String IMUserSig) {
        this.userId = userId;
        this.name = name;
        this.phoneNum = phoneNum;
        this.urgentContact = urgentContact;
        this.urgentContactNum = urgentContactNum;
        this.certificationCode = certificationCode;
        this.IMUserID = IMUserID;
        this.IMUserSig = IMUserSig;
    }

    @JSONField(name = USERID)
    public String getUserId() {
        return userId;
    }

    @JSONField(name = USERID)
    public void setUserId(String userId) {
        this.userId = userId;
    }

    @JSONField(name = NAME)
    public String getName() {
        return name;
    }

    @JSONField(name = NAME)
    public void setName(String name) {
        this.name = name;
    }

    @JSONField(name = PHONENUM)
    public String getPhoneNum() {
        return phoneNum;
    }

    @JSONField(name = PHONENUM)
    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    @JSONField(name = URGENTCONTACT)
    public String getUrgentContact() {
        return urgentContact;
    }

    @JSONField(name = URGENTCONTACT)
    public void setUrgentContact(String urgentContact) {
        this.urgentContact = urgentContact;
    }

    @JSONField(name = URGENTCONTACTNUM)
    public String getUrgentContactNum() {
        return urgentContactNum;
    }

    @JSONField(name = URGENTCONTACTNUM)
    public void setUrgentContactNum(String urgentContactNum) {
        this.urgentContactNum = urgentContactNum;
    }

    @JSONField(name = CERTIFICATIONCODE)
    public String getCertificationCode() {
        return certificationCode;
    }

    @JSONField(name = CERTIFICATIONCODE)
    public void setCertificationCode(String certificationCode) {
        this.certificationCode = certificationCode;
    }

    @JSONField(name = IM_USER_ID)
    public String getIMUserID() {
        return IMUserID;
    }

    @JSONField(name = IM_USER_ID)
    public void setIMUserID(String IMUserID) {
        this.IMUserID = IMUserID;
    }

    @JSONField(name = IM_USER_SIG)
    public String getIMUserSig() {
        return IMUserSig;
    }

    @JSONField(name = IM_USER_SIG)
    public void setIMUserSig(String IMUserSig) {
        this.IMUserSig = IMUserSig;
    }

    @Override
    public String toString() {
        return "UserModel{" +
                "userId='" + userId + '\'' +
                ", name='" + name + '\'' +
                ", phoneNum='" + phoneNum + '\'' +
                ", urgentContact='" + urgentContact + '\'' +
                ", urgentContactNum='" + urgentContactNum + '\'' +
                ", certificationCode='" + certificationCode + '\'' +
                ", IMUserID='" + IMUserID + '\'' +
                ", IMUserSig='" + IMUserSig + '\'' +
                '}';
    }
}
